package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.MemberCardBuyEntity;
import com.dragon.modules.yuegou.enums.wallet.MemberCardBuyPayCurrency;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员购买悦卡 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberCardBuyQuery extends MemberCardBuyEntity implements Query<MemberCardBuyEntity> {

    /** 购买记录ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 会员ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员钱包ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** 悦卡模板ID查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 购得的会员悦卡ID查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 悦卡面值（冗余）查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** 支付的金额查询条件 */
	@JsonUnwrapped(prefix = "payFee")
	private Condition<BigDecimal> payFeeCondition;

    /** [枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件 */
	@JsonUnwrapped(prefix = "payCurrency")
	private Condition<MemberCardBuyPayCurrency> payCurrencyCondition;

    /** 购买时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件 */
	@JsonUnwrapped(prefix = "thirdMchId")
	private Condition<String> thirdMchIdCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberCardBuyQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberCardBuyQuery(MemberCardBuyEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberCardBuyQuery(MemberCardBuyQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.payFeeCondition != null) {
			this.payFeeCondition = other.payFeeCondition.copy();
		}
		if(other.payCurrencyCondition != null) {
			this.payCurrencyCondition = other.payCurrencyCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.thirdMchIdCondition != null) {
			this.thirdMchIdCondition = other.thirdMchIdCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberCardBuyEntity> toQueryWrapper() {
		QueryWrapper<MemberCardBuyEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (payFeeCondition != null) {
			payFeeCondition.toWrapper(wrapper, COL_PAY_FEE);
		}
		if (payCurrencyCondition != null) {
			payCurrencyCondition.toWrapper(wrapper, COL_PAY_CURRENCY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (thirdMchIdCondition != null) {
			thirdMchIdCondition.toWrapper(wrapper, COL_THIRD_MCH_ID);
		}
		return wrapper;
	}

	/**
	 * 构造并返回购买记录ID查询条件
	 * 
	 * @return idCondition 购买记录ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取购买记录ID查询条件
	 * 
	 * @return idCondition 购买记录ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置购买记录ID查询条件
	 * 
	 * @param idCondition 购买记录ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID（冗余ID）查询条件
	 * 
	 * @param memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员钱包ID（冗余ID）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取会员钱包ID（冗余ID）查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置会员钱包ID（冗余ID）查询条件
	 * 
	 * @param memberWalletIdCondition 会员钱包ID（冗余ID）查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡模板ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡模板ID查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡模板ID查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回购得的会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 购得的会员悦卡ID查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取购得的会员悦卡ID查询条件
	 * 
	 * @return memberCardIdCondition 购得的会员悦卡ID查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置购得的会员悦卡ID查询条件
	 * 
	 * @param memberCardIdCondition 购得的会员悦卡ID查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回悦卡面值（冗余）查询条件
	 * 
	 * @return amountCondition 悦卡面值（冗余）查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取悦卡面值（冗余）查询条件
	 * 
	 * @return amountCondition 悦卡面值（冗余）查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置悦卡面值（冗余）查询条件
	 * 
	 * @param amountCondition 悦卡面值（冗余）查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回支付的金额查询条件
	 * 
	 * @return payFeeCondition 支付的金额查询条件
	 */
	public Condition<BigDecimal> payFee() {
		this.payFeeCondition = new Condition<>();
		return this.payFeeCondition;
	}
	
	/**
	 * 获取支付的金额查询条件
	 * 
	 * @return payFeeCondition 支付的金额查询条件
	 */
	public Condition<BigDecimal> getPayFeeCondition() {
		return payFeeCondition;
	}

	/**
	 * 设置支付的金额查询条件
	 * 
	 * @param payFeeCondition 支付的金额查询条件
	 */
	public void setPayFeeCondition(Condition<BigDecimal> payFeeCondition) {
		this.payFeeCondition = payFeeCondition;
	}

	/**
	 * 构造并返回[枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 * 
	 * @return payCurrencyCondition [枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 */
	public Condition<MemberCardBuyPayCurrency> payCurrency() {
		this.payCurrencyCondition = new Condition<>();
		return this.payCurrencyCondition;
	}
	
	/**
	 * 获取[枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 * 
	 * @return payCurrencyCondition [枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 */
	public Condition<MemberCardBuyPayCurrency> getPayCurrencyCondition() {
		return payCurrencyCondition;
	}

	/**
	 * 设置[枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 * 
	 * @param payCurrencyCondition [枚举]用于购买悦卡的币种：4-微信虚拟币-WECHAT、5-支付宝虚拟币-ALIPAY查询条件
	 */
	public void setPayCurrencyCondition(Condition<MemberCardBuyPayCurrency> payCurrencyCondition) {
		this.payCurrencyCondition = payCurrencyCondition;
	}

	/**
	 * 构造并返回购买时间查询条件
	 * 
	 * @return createdTimeCondition 购买时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取购买时间查询条件
	 * 
	 * @return createdTimeCondition 购买时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置购买时间查询条件
	 * 
	 * @param createdTimeCondition 购买时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 * 
	 * @return thirdMchIdCondition 第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 */
	public Condition<String> thirdMchId() {
		this.thirdMchIdCondition = new Condition<>();
		return this.thirdMchIdCondition;
	}
	
	/**
	 * 获取第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 * 
	 * @return thirdMchIdCondition 第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 */
	public Condition<String> getThirdMchIdCondition() {
		return thirdMchIdCondition;
	}

	/**
	 * 设置第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 * 
	 * @param thirdMchIdCondition 第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501查询条件
	 */
	public void setThirdMchIdCondition(Condition<String> thirdMchIdCondition) {
		this.thirdMchIdCondition = thirdMchIdCondition;
	}

}
